Skip to content

Conversation

@sg-
Copy link
Contributor

@sg- sg- commented Mar 24, 2014

I think this is an cleaner change than adding code to CMSIS files or creating a platform specific directory in /targets/cmsis. All other .o files are from /targets/cmsis except for retarget.o and that was the model for this change. Now each platform can create a platform_init.c file and use it to override default handlers or hook before main is called with mbed_sdk_init.

Tested with KL05Z, KL46Z, KL25Z and UBLOX_C027.

…bed.bld) and moved NMI_Handler from gpio_irq_api.c to platform_init.c for KL05Z, KL25Z and KL46Z target platforms to take advantage of this change.
bogdanm added a commit that referenced this pull request Mar 25, 2014
Create a platform specific file to override WEAK Handlers and pre-main hook mbed_sdk_init

I thought about a better solution for this problem, but I couldn't find one, so this is fine. Just one comment: I wouldn't name that file 'platform_init.c'. First, it might contain other code than just initialization code (for example, mbed_die is also declared as a weak function and we'll need to override it for NRF51822). Second, it doesn't realy send the "this file is special and should be treated as such" message. I'd call it something like 'mbed_overrides.c'. But I'll make this change later. Thanks for the pull request!
@bogdanm bogdanm merged commit d4c04e8 into ARMmbed:master Mar 25, 2014
@bogdanm
Copy link
Contributor

bogdanm commented Mar 25, 2014

I thought about a better solution for this problem, but I couldn't find one, so this is fine. Just one comment: I wouldn't name that file 'platform_init.c'. First, it might contain other code than just initialization code (for example, mbed_die is also declared as a weak function and we'll need to override it for NRF51822). Second, it doesn't realy send the "this file is special and should be treated as such" message. I'd call it something like 'mbed_overrides.c'. But I'll make this change later. Thanks for the pull request!

bridadan pushed a commit that referenced this pull request Jun 21, 2016
rajkan01 pushed a commit to rajkan01/mbed-os that referenced this pull request Mar 7, 2019
adbridge pushed a commit that referenced this pull request May 3, 2019
chrissnow pushed a commit to chrissnow/mbed-os that referenced this pull request May 15, 2019
urutva pushed a commit to urutva/mbed-os that referenced this pull request May 31, 2019
urutva pushed a commit to urutva/mbed-os that referenced this pull request Jun 13, 2019
pan- pushed a commit to pan-/mbed that referenced this pull request May 29, 2020
Update readme with some NUCLEO_WB55RG basic info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants